package com.leejxx.model.common.dto;

//import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Author LeeJx
 * @ClassName PageRequestDto
 * @Description TODO
 * @date 2021/2/4 9:45
 * @Version 1.0
 */
@Data
public class PageRequestDto {
//    @ApiModelProperty(value="当前页",required = true)
    protected Integer size;
//    @ApiModelProperty(value="每页显示条数",required = true)
    protected Integer page;

    public void checkParam() {
        if (this.page == null || this.page < 0) {
            setPage(1);
        }
        if (this.size == null || this.size < 0 || this.size > 100) {
            setSize(10);
        }
    }
}
